package com.xiangzi.util;

public class RedisKeyUtil {

	public static final String SEPARATOR = ":";

	public static String buildKey(String... args) {
		if (args == null)
			return null;

		int iMax = args.length - 1;
		if (iMax == -1)
			return null;

		StringBuilder b = new StringBuilder();
		for (int i = 0;; i++) {
			b.append(String.valueOf(args[i]));
			if (i == iMax)
				return b.toString();
			b.append(SEPARATOR);
		}
	}
	
}
